package com.np.retrofit211demo1.service;

import com.np.retrofit211demo1.bean.AccessTokenBean;
import com.np.retrofit211demo1.bean.SystemResponse;
import com.np.retrofit211demo1.bean.UserBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface SystemService {

    @POST("api/login")
    @Headers({"Content-Type: application/json"})
    Observable<SystemResponse<AccessTokenBean>> login(@Body RequestBody body);

    @GET("api/user/getInfo")
    Observable<SystemResponse<UserBean>> getInfo();
}